import Vue from "vue";
import VueRouter from "vue-router";
// 一级路由
import ShouYe from '../views/ShouYe.vue';
import SheQue from '../views/SheQu.vue';
//二级路由
import ShangPing from "../views/shouye/ShangPing.vue";
Vue.use(VueRouter);
export default new VueRouter({
    mode:'history',
    routes:[
        {
            path:'/shouye',
            name:'shouye',
            component:ShouYe,
            children:[
                {
                    path:'/src/views/shouye/ShangPing.vue',
                    name:'shangping',
                    component:ShangPing
                }
            ]
        },
        {
            path:'/shequ',
            name:'shequ',
            component:SheQue
        },
        {
            path:'/',
            redirect:{
                path:'/shouye'
            }
        }
    ]
})